package cn.ycl.auth.biz.menu.entity;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

/**
 * (Menubar)实体类
 *
 * @author makejava
 * @since 2020-12-03 20:50:03
 */
public class Menubar implements Serializable {
    private static final long serialVersionUID = -29923317358418376L;
    /**
     * id
     */
    private Long id;
    /**
     * 菜单名称
     */
    private String menuName;
    /**
     * 菜单级别
     */
    private Integer orderNum;
    /**
     * 菜单路径？
     */
    private String path;
    /**
     * 父菜单编号
     */
    private Long parentId;
    /**
     * 所需权限
     */
    private Long permission;
    /**
     * 菜单图标
     */
    private String icon;
    /**
     * 子菜单
     */
    private List<Menubar> children;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getPermission() {
        return permission;
    }

    public void setPermission(Long permission) {
        this.permission = permission;
    }

    public List<Menubar> getChildren() {
        return children;
    }

    public void setChildren(List<Menubar> children) {
        this.children = children;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof Menubar)) {
            return false;
        }
        Menubar menubar = (Menubar) o;
        return getId().equals(menubar.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId());
    }
}
